/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import Index from './pages/index'
import Navigator_next from './pages/Navigator_next'
import {
    NavigatorIOS,
    AppRegistry,
    StyleSheet,
} from 'react-native';
import FluxIndex from './pages/FluxIndex'

export default class HelloWorld extends Component {
  render() {
    return (
      <NavigatorIOS
          ref="nav"
          style={styles.container}
          initialRoute={{
              title: '首页',
              component:FluxIndex,
              rightButtonTitle:'第二页',
              passProps:{titles:'1'},
              onRightButtonPress:()=>
              this.refs.nav.push({
                title:'第 2 页',
                component:Navigator_next,
                navigationBarHidden:false,
                rightButtonTitle:'第三页',
                passProps:{titles:'2'}
              })
            }}
      />
    );
  }
}
class FluxTest extends Component {
  render() {
    return (
        <FluxIndex />
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
  }
});


AppRegistry.registerComponent('HelloWorld', () => FluxTest);
